package pikes.peak;

import java.util.LinkedHashMap;
import java.util.Map;

import org.springframework.web.servlet.support.RequestContext;

public abstract class URIParameterBuilder implements RequestProperty<Map<CharSequence, CharSequence>> {

	abstract protected void build(Map<CharSequence, CharSequence> parameters);

	public Map<CharSequence, CharSequence> getValue(Map model, RequestContext requestContext) throws Exception {
		LinkedHashMap<CharSequence, CharSequence> parameters = new LinkedHashMap<CharSequence, CharSequence>();
		build(parameters);
		return parameters;
	}
}
